package com.example.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Conversation implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableField("conversation_id")
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("sender_id")
    @ApiModelProperty(value = "发送者的用户ID")
    private String senderId;

    @TableField("receiver_id")
    @ApiModelProperty(value = "接收者的用户ID")
    private String receiverId;

    @TableField("message_text")
    @ApiModelProperty(value = "对话内容")
    private String messageText;

    @TableField("time_stamp")
    @ApiModelProperty(value = "对话发送的时间戳")
    private LocalDateTime timeStamp;
}
